export const actionArr = [{
		name: '1#开度',
		addr: 610, 
		type: 'slider',
		superable:0,
		deviceType:['46','49','00'],
		enums: [{ name: '1#开度', addr: 610, params: [0, 100] }],
	},
	{
		name: '2#开度',
		addr: 611, 
		type: 'slider',
		superable:0,
		deviceType:['46','49','00'],
		enums: [{ name: '2#开度', addr: 611, params: [0, 100] }],
	},
	{
			name: '3#开度',
			addr: 610, 
			type: 'slider',
			superable:0,
			deviceType:['49'],
			enums: [{ name: '3#开度', addr: 610, params: [0, 100] }],
		},
		{
			name: '4#开度',
			addr: 611, 
			type: 'slider',
			superable:0,
			deviceType:['49'],
			enums: [{ name: '4#开度', addr: 611, params: [0, 100] }],
		},
	{
		name: '关闭阀门',
		addr: 612,
		type: 'button',
		superable:0,
		deviceType:['46','00'],
		enums: [{ name: '关闭阀门', addr: 612, params: 1 }],
		value:1
	},
	{
		name: '电机运行',
		addr: 608,
		type: 'select',
		top:24,
		superable:1,
		deviceType:['49','46','00'],
		enums: [{ name: '运行', addr: 608, params: 1 }, { name: '停止', addr: 608, params: 0 }],
		value: 1
	}
]

export const stateArr = [{
		name: '阀门角度',
		addr:613,
		kunit: 0.01,
		unit: '°',
		value: '--',
		toFixed:2,
		superable:0,
	},
	{
		name: '电池电量',
		addr:614,
		kunit: 0.001,
		unit: 'V',
		value: '--',
		toFixed:2,
		superable:0,
	},
	{
		name: '出口压力1',
		addr:615,
		kunit: 0.1,
		unit: 'MPa',
		value: '--',
		toFixed:1,
		superable:0,
	},
	{
		name: '出口压力2',
		addr:616,
		kunit: 0.1,
		unit: 'MPa',
		value: '--',
		toFixed:1,
		superable:0,
	},
	{
		name: '累计流量',
		addr:617,
		len:2,
		kunit: 0.01,
		unit: 'm³',
		value: '--',
		toFixed:2,
		superable:0,
	},
	{
		name: '瞬时流量',
		addr:619,
		len:2,
		kunit: 1,
		unit: 'm³/h',
		value: '--',
		toFixed:2,
		superable:0,
		type:'float'
	}
]

export const settingFmArr = [
	{
		name: '阀门类型',
		addr: 600,
		type: 'select',
		dataType:'number',
		enums: [{ name: '正反转', addr: 600, params: 0 }, { name: '单向转', addr: 600, params: 1 }],
		value: 0,
		stateIdx: 0,
		superable:1,
	},
	{
		name: '设置零位',
		addr: 609,
		type: 'button',
		dataType:'number',
		enums: [{ name: '设置零位', addr: 609, params: 1 }],
		value: 1,
		stateIdx: 9,
		kunit:0.01,
		superable:1,
	}
]

export const settingArr = [
	{
		name: '发送频率',
		addr: 300,
		type: 'select',
		dataType:'number',
		enums: [{ name: 0, addr: 300, params: 0 },{ name: 1, addr: 300, params: 1 },{ name: 2, addr: 300, params: 2 },{ name: 3, addr: 300, params: 3 },{ name: 4, addr: 300, params: 4 },{ name: 5, addr: 300, params: 5 },{ name: 6, addr: 300, params: 6 },{ name: 7, addr: 300, params: 7 },{ name: 8, addr: 300, params: 8 },{ name: 9, addr: 300, params: 9 },{ name: 10, addr: 300, params: 10 },{ name: 11, addr: 300, params: 11 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '接收频率',
		addr: 301,
		type: 'select',
		dataType:'number',
		enums: [{ name: 0, addr: 301, params: 0 },{ name: 1, addr: 301, params: 1 },{ name: 2, addr: 301, params: 2 },{ name: 3, addr: 301, params: 3 },{ name: 4, addr: 301, params: 4 },{ name: 5, addr: 301, params: 5 },{ name: 6, addr: 301, params: 6 },{ name: 7, addr: 301, params: 7 },{ name: 8, addr: 301, params: 8 },{ name: 9, addr: 301, params: 9 },{ name: 10, addr: 301, params: 10 },{ name: 11, addr: 301, params: 11 }],
		value: '',
		stateIdx: 1,
		superable:0,
		confirmable:true
	}
]

export const settingAllArr = [
	{
		name: '设备类型',
		addr: 0, 
		len:1,
		type: 'readonly',
		dataType:'number',
		stateIdx: 1,
		superable:0,
		value:'',
		enums: []
	},
	{
		name: '实时位置设置',
		addr: 4567, 
		type: 'button',
		dataType:'number',
		stateIdx: 1,
		superable:1,
		enums: [{ name: '经度H', addr: 4, params: [0, 180] },{ name: '经度L', addr: 5, params: [0, 180] },{ name: '纬度H', addr: 6, params: [0, 180] },{ name: '纬度L', addr: 7, params: [0, 180] }],
	},
	{
		name: '设备地址',
		addr: 3, 
		type: 'input',
		dataType:'number',
		stateIdx: 0,
		superable:0,
		enums: [{ name: '设备地址', addr: 3, params: [11, 254] }],
		confirmable:true
	},
	{
		name: '恢复出厂设置',
		addr: 14,
		type: 'button',
		dataType:'number',
		superable:0,
		enums: [{ name: '恢复出厂设置', addr: 14, params: 1 }],
		value: 1
	},
	{
		name: '重启',
		addr: 15,
		type: 'button',
		superable:1,
		enums: [{ name: '重启', addr: 15, params: 1 }],
		value: 1
	},
	{
		name: '通讯密钥',
		addr: 17, 
		type: 'input',
		dataType:'number',
		stateIdx: 14,
		superable:0,
		enums: [{ name: '通讯密钥', addr: 17, params: [0, 65535]}],
		confirmable:true
	},
	{
		name: '上报间隔',
		addr: 18, 
		type: 'input',
		dataType:'number',
		stateIdx: 15,
		superable:1,
		enums: [{ name: '上报间隔', addr: 18, params: [1, 65535] }],
		suffix:'秒'
	},
	{
		name: '上报起始地址',
		addr: 19, 
		type: 'input',
		dataType:'number',
		stateIdx: 16,
		superable:1,
		enums: [{ name: '上报起始地址', addr: 19, params: [0, 65535] }],
	},
	{
		name: '上报寄存器数量长度',
		addr: 20, 
		type: 'input',
		dataType:'number',
		stateIdx: 17,
		superable:1,
		enums: [{ name: '上报寄存器数量', addr: 20, params: [1, 65535] }],
		value:''
	},
	{
		name: '状态召测',
		addr: 21,
		type: 'button',
		superable:0,
		enums: [{ name: '状态召测', addr: 21, params: 1 }],
		value:1
	}
]

export const mySet = [
	// {
	// 	name: '首次连接发送',
	// 	namekey:'connectSend',
	// 	type: 'switch',
	// 	enums: [{ name: '开启', params: 1 }, { name: '关闭', params: 0 }],
	// 	value:1
	// },
	// {
	// 	name: '首次连接发送字符串',
	// 	namekey:'connectSendStr',
	// 	type: 'input',
	// 	value:'YFWL'
	// },
	// {
	// 	name: '状态轮询',
	// 	namekey:'polling',
	// 	type: 'switch',
	// 	enums: [{ name: '开启', params: 1 }, { name: '关闭', params: 0 }],
	// 	value:1
	// },
	// {
	// 	name: '轮询间隔时间(秒)',
	// 	namekey:'pollingInter',
	// 	type: 'slider',
	// 	enums: [{ name: '间隔时间', params: [1, 120] }],
	// 	value:5
	// },
	// {
	// 	name: '设备标识前缀',
	// 	namekey:'deviceNameAttr',
	// 	type: 'input',
	// 	value:'YFWL'
	// },
	// {
	// 	name: '连接搜索时间(秒)',
	// 	namekey:'connectTimeout',
	// 	type: 'slider',
	// 	enums: [{ name: '间隔时间', params: [1, 120] }],
	// 	value:60
	// },
	{
		name: 'IP地址',
		type: 'input',
		namekey:'mqttHost',
		value:'www.zesi.com.cn',
	},
	{
		name: '端口',
		type: 'input',
		namekey:'mqttPort',
		value:'9082',
	},
	{
		name: '用户名',
		type: 'input',
		namekey:'mqttUser',
		value:'user',
	},
	{
		name: '密码',
		type: 'input',
		namekey:'mqttPassword',
		value:'Dev1@3$5',
	},
]

export const setting4GArr = [
	{
		name: '服务器连接状态',
		addr: 350, 
		len:1,
		type: 'readonly',
		dataType:'number',
		superable:0,
		stateIdx: 0,
		value:'',
		enums: [{ name: '已连接', addr: 350, value: 1 },{ name: '未连接', addr: 350, value: 0 }]
	},
	{
		name: 'ICCID',
		addr: 351, 
		len:10,
		type: 'readonly',
		dataType:'char',
		superable:0,
		stateIdx: 0,
		value:'',
		enums: []
	},
	{
		name: 'IMEI',
		addr: 362, 
		len:8,
		type: 'readonly',
		dataType:'char',
		superable:0,
		stateIdx: 1,
		value:'',
		enums: []
	},
	{
		name: '信号强度',
		addr: 372, 
		len:1,
		type: 'readonly',
		dataType:'number',
		superable:0,
		stateIdx: 2,
		value:'',
		enums: []
	},
	{
		name: '网络注册情况',
		addr: 373, 
		len:1,
		type: 'readonly',
		dataType:'number',
		superable:0,
		stateIdx: 3,
		value:'',
		enums: [{ name: '已注册', addr: 373, value: 1 },{ name: '未注册', addr: 350, value: 0 }]
	},
	{
		name: 'IP地址',
		addr: 375, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 4,
		value:'',
		enums: [{ name: 'IP地址', addr: 375 }],
	},
	{
		name: '端口',
		addr: 374, 
		len:1,
		type: 'input',
		dataType:'number',
		superable:0,
		stateIdx: 5,
		value:'',
		enums: [{ name: '端口', addr: 374, params: [1, 65535] }],
	},
	{
		name: 'Client',
		addr: 395, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 7,
		value:'',
		enums: [{ name: 'Client', addr: 395 }],
	},
	{
		name: '用户名',
		addr: 415, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 6,
		value:'',
		enums: [{ name: '用户名', addr: 415 }],
	},
	{
		name: '密码',
		addr: 435, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 7,
		value:'',
		enums: [{ name: '密码', addr: 435 }],
	},
	{
		name: 'mqtt发布主题',
		addr: 455, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 8,
		value:'',
		enums: [{ name: 'mqtt发布主题', addr: 455 }],
	},
	{
		name: 'mqtt订阅主题1',
		addr: 475, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 8,
		value:'',
		enums: [{ name: 'mqtt订阅主题1', addr: 475 }],
	},
	{
		name: 'mqtt订阅主题2',
		addr: 495, 
		len:20,
		type: 'input',
		dataType:'char',
		superable:0,
		stateIdx: 9,
		value:'',
		enums: [{ name: 'mqtt订阅主题2', addr: 495 }],
	},
]

export const settingFkqArr = [
	{
		name: '1#端口',
		addr: 808,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 808, params: 1 },{ name: '关闭', addr: 808, params: 0 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '2#端口',
		addr: 809,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 809, params: 1 },{ name: '关闭', addr: 809, params: 0 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '3#端口',
		addr: 810,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 810, params: 1 },{ name: '关闭', addr: 810, params: 0 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '4#端口',
		addr: 811,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 811, params: 1 },{ name: '关闭', addr: 811, params: 0 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '电池电量',
		addr: 812,
		type: 'readonly',
		dataType:'number',
		kunit: 0.001,
		unit: 'V',
		toFixed:2,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '1#压力',
		addr: 813,
		type: 'readonly',
		dataType:'number',
		kunit: 1,
		unit: 'MPa',
		toFixed:0,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '2#压力',
		addr: 814,
		type: 'readonly',
		dataType:'number',
		kunit: 1,
		unit: 'MPa',
		toFixed:0,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '3#压力',
		addr: 815,
		type: 'readonly',
		dataType:'number',
		kunit: 1,
		unit: 'MPa',
		toFixed:0,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '4#压力',
		addr: 816,
		type: 'readonly',
		dataType:'number',
		kunit: 1,
		unit: 'MPa',
		toFixed:0,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
]

export const settingDdfArr = [
	{
		name: '1#阀',
		addr: 808,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 808, params: 1 },{ name: '关闭', addr: 808, params: 0 },{ name: '停止', addr: 808, params: 255 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '2#阀',
		addr: 809,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 809, params: 1 },{ name: '关闭', addr: 809, params: 0 },{ name: '停止', addr: 809, params: 255 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '3#阀',
		addr: 810,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 810, params: 1 },{ name: '关闭', addr: 810, params: 0 },{ name: '停止', addr: 810, params: 255 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '4#阀',
		addr: 811,
		type: 'select',
		dataType:'number',
		enums: [{ name: '打开', addr: 811, params: 1 },{ name: '关闭', addr: 811, params: 0 },{ name: '停止', addr: 811, params: 255 }],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '电池电量',
		addr: 812,
		type: 'readonly',
		dataType:'number',
		kunit: 0.001,
		unit: 'V',
		toFixed:2,
		enums: [],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '1#状态',
		addr: 813,
		type: 'readonly',
		dataType:'text',
		kunit: 1,
		unit: '',
		toFixed:0,
		enums: [{value:1,name:'右到位'},{value:2,name:'左到位'},{value:0,name:'未到位'},{value:3,name:'未到位'}],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '2#状态',
		addr: 814,
		type: 'readonly',
		dataType:'text',
		kunit: 1,
		unit: '',
		toFixed:0,
		enums: [{value:1,name:'右到位'},{value:2,name:'左到位'},{value:0,name:'未到位'},{value:3,name:'未到位'}],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '3#状态',
		addr: 815,
		type: 'readonly',
		dataType:'text',
		kunit: 1,
		unit: '',
		toFixed:0,
		enums: [{value:1,name:'右到位'},{value:2,name:'左到位'},{value:0,name:'未到位'},{value:3,name:'未到位'}],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
	{
		name: '4#状态',
		addr: 816,
		type: 'readonly',
		dataType:'text',
		kunit: 1,
		unit: '',
		toFixed:0,
		enums: [{value:1,name:'右到位'},{value:2,name:'左到位'},{value:0,name:'未到位'},{value:3,name:'未到位'}],
		value: '',
		stateIdx: 0,
		superable:0,
		confirmable:true
	},
]
